﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:local="clr-namespace:TeamCreation"
    xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
    xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
    x:Class="TeamCreation.MainPage" x:Name="HostControl">

    <toolkit:BusyIndicator x:Name="Busy">

        <Grid x:Name="LayoutRoot" >
            <Grid.Background>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FFC7C7C7" Offset="0" />
                    <GradientStop Color="#FFECECF2" Offset="1" />
                </LinearGradientBrush>
            </Grid.Background>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0" x:Name="HeaderStackPanel" Orientation="Horizontal">
                <TextBlock x:Name="SectionTextBlock" Height="19" TextWrapping="Wrap" Text="Section:" VerticalAlignment="Top" Width="74" />
                <ComboBox x:Name="comboSections" VerticalAlignment="Top" Width="76"/>
                <Button x:Name="ClearTeams" Content="Unassign All" VerticalAlignment="Top" Width="133" Click="ClearTeams_Click" />
            </StackPanel>

            <StackPanel Grid.Row="1" Orientation="Horizontal">
                <ScrollViewer x:Name="leftScroll"  VerticalScrollBarVisibility="Auto" BorderThickness="0" HorizontalAlignment="Left">
                    <local:Team x:Name="UnassignedList" HorizontalAlignment="Left"/>
                </ScrollViewer>
                <Border BorderThickness="1">
                    <Border.BorderBrush>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="Black" Offset="0"/>
                            <GradientStop Color="#FFC8E1EB" Offset="1"/>
                        </LinearGradientBrush>
                    </Border.BorderBrush>
                    <ScrollViewer x:Name="rightScroll" VerticalScrollBarVisibility="Auto" BorderThickness="0">
                        <toolkit:WrapPanel x:Name="Teams" MaxWidth="500">
                            <local:AddButton x:Name="NewTeamBox"/>
                        </toolkit:WrapPanel>
                    </ScrollViewer>
                </Border>
            </StackPanel>

            <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right">
                <Button x:Name="PublishChanges" Content="Save and Close" Margin="0,0,20,0"  Click="PublishChanges_Click" Width="133" />
                <Button x:Name="CancelChanges" Content="Cancel" Width="133" Click="CancelChanges_Click"  />
            </StackPanel>

        </Grid>
    </toolkit:BusyIndicator>
</UserControl>